#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "head.h"
int wc_func(char *file_name);
{
	int w = 0;
	int state = 0;
	FILE *in;
	if((in = fopen(file_name,"r"))==NULL)
	{
		printf("wc %s:no this file or dir\n",file_name);
		return;
	}
	while((t=fgetc(in))!=EOF)
	{
		
		if(t=='\n'||t==' '||t=='\r') {
            		state = 0;
            		continue;
        	} else {
            		if(state == 0) {
                	state = 1;
                	w++;
           		}
            		continue;
        	}
	}
	return w;
}







